package com.znsd.dining.room.exception;

import lombok.Data;

/**
 * @ClassName MyException
 * @Description: TODO
 * @Author timi
 * @Date 2020/1/2
 * @Time 22:03
 * @Version V1.0
 **/
@Data
public class MyException extends RuntimeException
{
    private String msg;
    private int code = 500;
    
    public MyException(String msg){
        super(msg);
        this.msg = msg;
    }
    public MyException(String msg, Throwable e){
        super(msg,e);
        this.msg = msg;
    }
    
    public MyException(String msg, int code){
        super(msg);
        this.msg = msg;
        this.code = code;
    }
    
    public MyException(String msg, int code, Throwable e){
        super(msg,e);
        this.msg = msg;
        this.code = code;
    }
}
